<?php if (!defined('ROOT_DIR')) exit('No direct script access!');

class Registry {
    
    private $_objects = array();
    
    public function __get( $key = ''  )
    {
        if ( isset( $this->_objects[ $key ] ) ) {
            return $this->_objects[ $key ];
        } else {
            exit("Unable to load <b>'{$key}'</b> from the Registry!");
        }
    }
    
    public function __set( $key = ''  , $value = '' )
    {
        $this->_objects[ $key ] = $value;
    }
    
}